#ifndef _HOOK_SYSCALL_INTERNAL_PROTO_H
#define _HOOK_SYSCALL_INTERNAL_PROTO_H

#include <linux/syscalls.h>

typedef asmlinkage long (*sys_io_setup_func_t)(unsigned      nr_reqs,
                                               aio_context_t __user* ctx);
typedef asmlinkage long (*sys_io_destroy_func_t)(aio_context_t ctx);
typedef asmlinkage long (*sys_io_submit_func_t)(aio_context_t, long,
                                                struct iocb __user* __user*);
typedef asmlinkage long (*sys_io_cancel_func_t)(aio_context_t ctx_id,
                                                struct iocb __user* iocb,
                                                struct io_event __user* result);
typedef asmlinkage long (*sys_io_getevents_func_t)(
    aio_context_t ctx_id, long min_nr, long nr, struct io_event __user* events,
    struct __kernel_timespec __user* timeout);
typedef asmlinkage long (*sys_io_getevents_time32_func_t)(
    __u32 ctx_id, __s32 min_nr, __s32 nr, struct io_event __user* events,
    struct old_timespec32 __user* timeout);
typedef asmlinkage long (*sys_io_pgetevents_func_t)(
    aio_context_t ctx_id, long min_nr, long nr, struct io_event __user* events,
    struct __kernel_timespec __user* timeout, const struct __aio_sigset* sig);
typedef asmlinkage long (*sys_io_pgetevents_time32_func_t)(
    aio_context_t ctx_id, long min_nr, long nr, struct io_event __user* events,
    struct old_timespec32 __user* timeout, const struct __aio_sigset* sig);
typedef asmlinkage long (*sys_io_uring_enter_func_t)(
    unsigned int fd, u32 to_submit, u32 min_complete, u32 flags,
    const sigset_t __user* sig, size_t sigsz);
typedef asmlinkage long (*sys_io_uring_register_func_t)(unsigned int fd,
                                                        unsigned int op,
                                                        void __user* arg,
                                                        unsigned int nr_args);

/* fs/xattr.c */
typedef asmlinkage long (*sys_setxattr_func_t)(const char __user* path,
                                               const char __user* name,
                                               const void __user* value,
                                               size_t size, int flags);
typedef asmlinkage long (*sys_lsetxattr_func_t)(const char __user* path,
                                                const char __user* name,
                                                const void __user* value,
                                                size_t size, int flags);
typedef asmlinkage long (*sys_fsetxattr_func_t)(int fd, const char __user* name,
                                                const void __user* value,
                                                size_t size, int flags);
typedef asmlinkage long (*sys_getxattr_func_t)(const char __user* path,
                                               const char __user* name,
                                               void __user* value, size_t size);
typedef asmlinkage long (*sys_lgetxattr_func_t)(const char __user* path,
                                                const char __user* name,
                                                void __user* value,
                                                size_t       size);
typedef asmlinkage long (*sys_fgetxattr_func_t)(int fd, const char __user* name,
                                                void __user* value,
                                                size_t       size);
typedef asmlinkage long (*sys_listxattr_func_t)(const char __user* path,
                                                char __user* list, size_t size);
typedef asmlinkage long (*sys_llistxattr_func_t)(const char __user* path,
                                                 char __user* list,
                                                 size_t       size);
typedef asmlinkage long (*sys_flistxattr_func_t)(int fd, char __user* list,
                                                 size_t size);
typedef asmlinkage long (*sys_removexattr_func_t)(const char __user* path,
                                                  const char __user* name);
typedef asmlinkage long (*sys_lremovexattr_func_t)(const char __user* path,
                                                   const char __user* name);
typedef asmlinkage long (*sys_fremovexattr_func_t)(int        fd,
                                                   const char __user* name);

/* fs/dcache.c */
typedef asmlinkage long (*sys_getcwd_func_t)(char __user*  buf,
                                             unsigned long size);

/* fs/cookies.c */
typedef asmlinkage long (*sys_lookup_dcookie_func_t)(u64  cookie64,
                                                     char __user* buf,
                                                     size_t       len);

/* fs/eventfd.c */
typedef asmlinkage long (*sys_eventfd2_func_t)(unsigned int count, int flags);

/* fs/eventpoll.c */
typedef asmlinkage long (*sys_epoll_create1_func_t)(int flags);
typedef asmlinkage long (*sys_epoll_ctl_func_t)(
    int epfd, int op, int fd, struct epoll_event __user* event);
typedef asmlinkage long (*sys_epoll_pwait_func_t)(
    int epfd, struct epoll_event __user* events, int maxevents, int timeout,
    const sigset_t __user* sigmask, size_t sigsetsize);

/* fs/fcntl.c */
typedef asmlinkage long (*sys_dup_func_t)(unsigned int fildes);
typedef asmlinkage long (*sys_dup3_func_t)(unsigned int oldfd,
                                           unsigned int newfd, int flags);
typedef asmlinkage long (*sys_fcntl_func_t)(unsigned int fd, unsigned int cmd,
                                            unsigned long arg);
#if BITS_PER_LONG == 32
typedef asmlinkage long (*sys_fcntl64_func_t)(unsigned int fd, unsigned int cmd,
                                              unsigned long arg);
#endif

/* fs/inotify_user.c */
typedef asmlinkage long (*sys_inotify_init1_func_t)(int flags);
typedef asmlinkage long (*sys_inotify_add_watch_func_t)(int        fd,
                                                        const char __user* path,
                                                        u32 mask);
typedef asmlinkage long (*sys_inotify_rm_watch_func_t)(int fd, __s32 wd);

/* fs/ioctl.c */
typedef asmlinkage long (*sys_ioctl_func_t)(unsigned int fd, unsigned int cmd,
                                            unsigned long arg);

/* fs/ioprio.c */
typedef asmlinkage long (*sys_ioprio_set_func_t)(int which, int who,
                                                 int ioprio);
typedef asmlinkage long (*sys_ioprio_get_func_t)(int which, int who);

/* fs/locks.c */
typedef asmlinkage long (*sys_flock_func_t)(unsigned int fd, unsigned int cmd);

/* fs/namei.c */
typedef asmlinkage long (*sys_mknodat_func_t)(int        dfd,
                                              const char __user* filename,
                                              umode_t mode, unsigned dev);
typedef asmlinkage long (*sys_mkdirat_func_t)(int        dfd,
                                              const char __user* pathname,
                                              umode_t            mode);
typedef asmlinkage long (*sys_unlinkat_func_t)(int        dfd,
                                               const char __user* pathname,
                                               int                flag);
typedef asmlinkage long (*sys_symlinkat_func_t)(const char __user* oldname,
                                                int                newdfd,
                                                const char __user* newname);
typedef asmlinkage long (*sys_linkat_func_t)(int        olddfd,
                                             const char __user* oldname,
                                             int                newdfd,
                                             const char __user* newname,
                                             int                flags);
typedef asmlinkage long (*sys_renameat_func_t)(int        olddfd,
                                               const char __user* oldname,
                                               int                newdfd,
                                               const char __user* newname);

/* fs/namespace.c */
typedef asmlinkage long (*sys_umount_func_t)(char __user* name, int flags);
typedef asmlinkage long (*sys_mount_func_t)(char __user* dev_name,
                                            char __user* dir_name,
                                            char __user*  type,
                                            unsigned long flags,
                                            void __user* data);
typedef asmlinkage long (*sys_pivot_root_func_t)(const char __user* new_root,
                                                 const char __user* put_old);

/* fs/nfsctl.c */

/* fs/open.c */
typedef asmlinkage long (*sys_statfs_func_t)(const char __user* path,
                                             struct statfs __user* buf);
typedef asmlinkage long (*sys_statfs64_func_t)(const char __user* path,
                                               size_t             sz,
                                               struct statfs64 __user* buf);
typedef asmlinkage long (*sys_fstatfs_func_t)(unsigned int  fd,
                                              struct statfs __user* buf);
typedef asmlinkage long (*sys_fstatfs64_func_t)(unsigned int fd, size_t sz,
                                                struct statfs64 __user* buf);
typedef asmlinkage long (*sys_truncate_func_t)(const char __user* path,
                                               long               length);
typedef asmlinkage long (*sys_ftruncate_func_t)(unsigned int  fd,
                                                unsigned long length);
#if BITS_PER_LONG == 32
typedef asmlinkage long (*sys_truncate64_func_t)(const char __user* path,
                                                 loff_t             length);
typedef asmlinkage long (*sys_ftruncate64_func_t)(unsigned int fd,
                                                  loff_t       length);
#endif
typedef asmlinkage long (*sys_fallocate_func_t)(int fd, int mode, loff_t offset,
                                                loff_t len);
typedef asmlinkage long (*sys_faccessat_func_t)(int        dfd,
                                                const char __user* filename,
                                                int                mode);
typedef asmlinkage long (*sys_faccessat2_func_t)(int        dfd,
                                                 const char __user* filename,
                                                 int mode, int flags);
typedef asmlinkage long (*sys_chdir_func_t)(const char __user* filename);
typedef asmlinkage long (*sys_fchdir_func_t)(unsigned int fd);
typedef asmlinkage long (*sys_chroot_func_t)(const char __user* filename);
typedef asmlinkage long (*sys_fchmod_func_t)(unsigned int fd, umode_t mode);
typedef asmlinkage long (*sys_fchmodat_func_t)(int        dfd,
                                               const char __user* filename,
                                               umode_t            mode);
typedef asmlinkage long (*sys_fchownat_func_t)(int        dfd,
                                               const char __user* filename,
                                               uid_t user, gid_t group,
                                               int flag);
typedef asmlinkage long (*sys_fchown_func_t)(unsigned int fd, uid_t user,
                                             gid_t group);
typedef asmlinkage long (*sys_openat_func_t)(int        dfd,
                                             const char __user* filename,
                                             int flags, umode_t mode);
typedef asmlinkage long (*sys_close_func_t)(unsigned int fd);
typedef asmlinkage long (*sys_vhangup_func_t)(void);

/* fs/pipe.c */
typedef asmlinkage long (*sys_pipe2_func_t)(int __user* fildes, int flags);

/* fs/quota.c */
typedef asmlinkage long (*sys_quotactl_func_t)(unsigned int cmd,
                                               const char __user* special,
                                               qid_t id, void __user* addr);

/* fs/readdir.c */
typedef asmlinkage long (*sys_getdents64_func_t)(
    unsigned int fd, struct linux_dirent64 __user* dirent, unsigned int count);

/* fs/read_write.c */
typedef asmlinkage long (*sys_llseek_func_t)(unsigned int  fd,
                                             unsigned long offset_high,
                                             unsigned long offset_low,
                                             loff_t __user* result,
                                             unsigned int   whence);
typedef asmlinkage long (*sys_lseek_func_t)(unsigned int fd, off_t offset,
                                            unsigned int whence);
typedef asmlinkage long (*sys_read_func_t)(unsigned int fd, char __user* buf,
                                           size_t count);
typedef asmlinkage long (*sys_write_func_t)(unsigned int fd,
                                            const char __user* buf,
                                            size_t             count);
typedef asmlinkage long (*sys_readv_func_t)(unsigned long      fd,
                                            const struct iovec __user* vec,
                                            unsigned long              vlen);
typedef asmlinkage long (*sys_writev_func_t)(unsigned long      fd,
                                             const struct iovec __user* vec,
                                             unsigned long              vlen);
typedef asmlinkage long (*sys_pread64_func_t)(unsigned int fd, char __user* buf,
                                              size_t count, loff_t pos);
typedef asmlinkage long (*sys_pwrite64_func_t)(unsigned int fd,
                                               const char __user* buf,
                                               size_t count, loff_t pos);
typedef asmlinkage long (*sys_preadv_func_t)(unsigned long      fd,
                                             const struct iovec __user* vec,
                                             unsigned long              vlen,
                                             unsigned long              pos_l,
                                             unsigned long              pos_h);
typedef asmlinkage long (*sys_pwritev_func_t)(unsigned long      fd,
                                              const struct iovec __user* vec,
                                              unsigned long              vlen,
                                              unsigned long              pos_l,
                                              unsigned long              pos_h);

/* fs/sendfile.c */
typedef asmlinkage long (*sys_sendfile64_func_t)(int out_fd, int in_fd,
                                                 loff_t __user* offset,
                                                 size_t         count);

/* fs/select.c */
typedef asmlinkage long (*sys_pselect6_func_t)(int, fd_set __user*,
                                               fd_set __user*, fd_set __user*,
                                               struct __kernel_timespec __user*,
                                               void __user*);
typedef asmlinkage long (*sys_pselect6_time32_func_t)(
    int, fd_set __user*, fd_set __user*, fd_set __user*,
    struct old_timespec32 __user*, void __user*);
typedef asmlinkage long (*sys_ppoll_func_t)(struct pollfd __user*, unsigned int,
                                            struct __kernel_timespec __user*,
                                            const sigset_t __user*, size_t);
typedef asmlinkage long (*sys_ppoll_time32_func_t)(
    struct pollfd __user*, unsigned int, struct old_timespec32 __user*,
    const sigset_t __user*, size_t);

/* fs/signalfd.c */
typedef asmlinkage long (*sys_signalfd4_func_t)(int      ufd,
                                                sigset_t __user* user_mask,
                                                size_t sizemask, int flags);

/* fs/splice.c */
typedef asmlinkage long (*sys_vmsplice_func_t)(int                fd,
                                               const struct iovec __user* iov,
                                               unsigned long nr_segs,
                                               unsigned int  flags);
typedef asmlinkage long (*sys_splice_func_t)(int fd_in, loff_t __user* off_in,
                                             int fd_out, loff_t __user* off_out,
                                             size_t len, unsigned int flags);
typedef asmlinkage long (*sys_tee_func_t)(int fdin, int fdout, size_t len,
                                          unsigned int flags);

/* fs/stat.c */
typedef asmlinkage long (*sys_readlinkat_func_t)(int        dfd,
                                                 const char __user* path,
                                                 char __user* buf, int bufsiz);
typedef asmlinkage long (*sys_newfstatat_func_t)(int        dfd,
                                                 const char __user* filename,
                                                 struct stat __user* statbuf,
                                                 int                 flag);
typedef asmlinkage long (*sys_newfstat_func_t)(unsigned int fd,
                                               struct stat __user* statbuf);
#if defined(__ARCH_WANT_STAT64) || defined(__ARCH_WANT_COMPAT_STAT64)
typedef asmlinkage long (*sys_fstat64_func_t)(unsigned long fd,
                                              struct stat64 __user* statbuf);
typedef asmlinkage long (*sys_fstatat64_func_t)(int        dfd,
                                                const char __user* filename,
                                                struct stat64 __user* statbuf,
                                                int                   flag);
#endif

/* fs/sync.c */
typedef asmlinkage long (*sys_sync_func_t)(void);
typedef asmlinkage long (*sys_fsync_func_t)(unsigned int fd);
typedef asmlinkage long (*sys_fdatasync_func_t)(unsigned int fd);
typedef asmlinkage long (*sys_sync_file_range2_func_t)(int          fd,
                                                       unsigned int flags,
                                                       loff_t       offset,
                                                       loff_t       nbytes);
typedef asmlinkage long (*sys_sync_file_range_func_t)(int fd, loff_t offset,
                                                      loff_t       nbytes,
                                                      unsigned int flags);

/* fs/timerfd.c */
typedef asmlinkage long (*sys_timerfd_create_func_t)(int clockid, int flags);
typedef asmlinkage long (*sys_timerfd_settime_func_t)(
    int ufd, int flags, const struct __kernel_itimerspec __user* utmr,
    struct __kernel_itimerspec __user* otmr);
typedef asmlinkage long (*sys_timerfd_gettime_func_t)(
    int ufd, struct __kernel_itimerspec __user* otmr);
typedef asmlinkage long (*sys_timerfd_gettime32_func_t)(
    int ufd, struct old_itimerspec32 __user* otmr);
typedef asmlinkage long (*sys_timerfd_settime32_func_t)(
    int ufd, int flags, const struct old_itimerspec32 __user* utmr,
    struct old_itimerspec32 __user* otmr);

/* fs/utimes.c */
typedef asmlinkage long (*sys_utimensat_func_t)(
    int dfd, const char __user* filename,
    struct __kernel_timespec __user* utimes, int flags);
typedef asmlinkage long (*sys_utimensat_time32_func_t)(
    unsigned int dfd, const char __user* filename,
    struct old_timespec32 __user* t, int flags);

/* kernel/acct.c */
typedef asmlinkage long (*sys_acct_func_t)(const char __user* name);

/* kernel/capability.c */
typedef asmlinkage long (*sys_capget_func_t)(cap_user_header_t header,
                                             cap_user_data_t   dataptr);
typedef asmlinkage long (*sys_capset_func_t)(cap_user_header_t     header,
                                             const cap_user_data_t data);

/* kernel/exec_domain.c */
typedef asmlinkage long (*sys_personality_func_t)(unsigned int personality);

/* kernel/exit.c */
typedef asmlinkage long (*sys_exit_func_t)(int error_code);
typedef asmlinkage long (*sys_exit_group_func_t)(int error_code);
typedef asmlinkage long (*sys_waitid_func_t)(int which, pid_t pid,
                                             struct siginfo __user* infop,
                                             int                    options,
                                             struct rusage __user* ru);

/* kernel/fork.c */
typedef asmlinkage long (*sys_set_tid_address_func_t)(int __user* tidptr);
typedef asmlinkage long (*sys_unshare_func_t)(unsigned long unshare_flags);

/* kernel/futex.c */
typedef asmlinkage long (*sys_futex_func_t)(
    u32 __user* uaddr, int op, u32 val, struct __kernel_timespec __user* utime,
    u32 __user* uaddr2, u32 val3);
typedef asmlinkage long (*sys_futex_time32_func_t)(
    u32 __user* uaddr, int op, u32 val, struct old_timespec32 __user* utime,
    u32 __user* uaddr2, u32 val3);
typedef asmlinkage long (*sys_get_robust_list_func_t)(
    int pid, struct robust_list_head __user* __user* head_ptr,
    size_t __user* len_ptr);
typedef asmlinkage long (*sys_set_robust_list_func_t)(
    struct robust_list_head __user* head, size_t len);

/* kernel/hrtimer.c */
typedef asmlinkage long (*sys_nanosleep_func_t)(
    struct __kernel_timespec __user* rqtp,
    struct __kernel_timespec __user* rmtp);
typedef asmlinkage long (*sys_nanosleep_time32_func_t)(
    struct old_timespec32 __user* rqtp, struct old_timespec32 __user* rmtp);

/* kernel/kexec.c */
typedef asmlinkage long (*sys_kexec_load_func_t)(
    unsigned long entry, unsigned long nr_segments,
    struct kexec_segment __user* segments, unsigned long flags);

/* kernel/module.c */
typedef asmlinkage long (*sys_init_module_func_t)(void __user*  umod,
                                                  unsigned long len,
                                                  const char __user* uargs);
typedef asmlinkage long (*sys_delete_module_func_t)(
    const char __user* name_user, unsigned int flags);

/* kernel/posix-timers.c */
typedef asmlinkage long (*sys_timer_create_func_t)(
    clockid_t which_clock, struct sigevent __user* timer_event_spec,
    timer_t __user* created_timer_id);
typedef asmlinkage long (*sys_timer_gettime_func_t)(
    timer_t timer_id, struct __kernel_itimerspec __user* setting);
typedef asmlinkage long (*sys_timer_getoverrun_func_t)(timer_t timer_id);
typedef asmlinkage long (*sys_timer_settime_func_t)(
    timer_t timer_id, int flags,
    const struct __kernel_itimerspec __user* new_setting,
    struct __kernel_itimerspec __user* old_setting);
typedef asmlinkage long (*sys_timer_delete_func_t)(timer_t timer_id);
typedef asmlinkage long (*sys_clock_settime_func_t)(
    clockid_t which_clock, const struct __kernel_timespec __user* tp);
typedef asmlinkage long (*sys_clock_gettime_func_t)(
    clockid_t which_clock, struct __kernel_timespec __user* tp);
typedef asmlinkage long (*sys_clock_getres_func_t)(
    clockid_t which_clock, struct __kernel_timespec __user* tp);
typedef asmlinkage long (*sys_clock_nanosleep_func_t)(
    clockid_t which_clock, int flags,
    const struct __kernel_timespec __user* rqtp,
    struct __kernel_timespec __user* rmtp);
typedef asmlinkage long (*sys_timer_gettime32_func_t)(
    timer_t timer_id, struct old_itimerspec32 __user* setting);
typedef asmlinkage long (*sys_timer_settime32_func_t)(
    timer_t timer_id, int flags, struct old_itimerspec32 __user* new,
    struct old_itimerspec32 __user* old);
typedef asmlinkage long (*sys_clock_settime32_func_t)(
    clockid_t which_clock, struct old_timespec32 __user* tp);
typedef asmlinkage long (*sys_clock_gettime32_func_t)(
    clockid_t which_clock, struct old_timespec32 __user* tp);
typedef asmlinkage long (*sys_clock_getres_time32_func_t)(
    clockid_t which_clock, struct old_timespec32 __user* tp);
typedef asmlinkage long (*sys_clock_nanosleep_time32_func_t)(
    clockid_t which_clock, int flags, struct old_timespec32 __user* rqtp,
    struct old_timespec32 __user* rmtp);

/* kernel/printk.c */
typedef asmlinkage long (*sys_syslog_func_t)(int type, char __user* buf,
                                             int len);

/* kernel/ptrace.c */
typedef asmlinkage long (*sys_ptrace_func_t)(long request, long pid,
                                             unsigned long addr,
                                             unsigned long data);
/* kernel/sched/core.c */

typedef asmlinkage long (*sys_sched_setparam_func_t)(
    pid_t pid, struct sched_param __user* param);
typedef asmlinkage long (*sys_sched_setscheduler_func_t)(
    pid_t pid, int policy, struct sched_param __user* param);
typedef asmlinkage long (*sys_sched_getscheduler_func_t)(pid_t pid);
typedef asmlinkage long (*sys_sched_getparam_func_t)(
    pid_t pid, struct sched_param __user* param);
typedef asmlinkage long (*sys_sched_setaffinity_func_t)(
    pid_t pid, unsigned int len, unsigned long __user* user_mask_ptr);
typedef asmlinkage long (*sys_sched_getaffinity_func_t)(
    pid_t pid, unsigned int len, unsigned long __user* user_mask_ptr);
typedef asmlinkage long (*sys_sched_yield_func_t)(void);
typedef asmlinkage long (*sys_sched_get_priority_max_func_t)(int policy);
typedef asmlinkage long (*sys_sched_get_priority_min_func_t)(int policy);
typedef asmlinkage long (*sys_sched_rr_get_interval_func_t)(
    pid_t pid, struct __kernel_timespec __user* interval);
typedef asmlinkage long (*sys_sched_rr_get_interval_time32_func_t)(
    pid_t pid, struct old_timespec32 __user* interval);

/* kernel/signal.c */
typedef asmlinkage long (*sys_restart_syscall_func_t)(void);
typedef asmlinkage long (*sys_kill_func_t)(pid_t pid, int sig);
typedef asmlinkage long (*sys_tkill_func_t)(pid_t pid, int sig);
typedef asmlinkage long (*sys_tgkill_func_t)(pid_t tgid, pid_t pid, int sig);
typedef asmlinkage long (*sys_sigaltstack_func_t)(
    const struct sigaltstack __user* uss, struct sigaltstack __user* uoss);
typedef asmlinkage long (*sys_rt_sigsuspend_func_t)(sigset_t __user* unewset,
                                                    size_t sigsetsize);
#ifndef CONFIG_ODD_RT_SIGACTION
typedef asmlinkage long (*sys_rt_sigaction_func_t)(
    int, const struct sigaction __user*, struct sigaction __user*, size_t);
#endif
typedef asmlinkage long (*sys_rt_sigprocmask_func_t)(int      how,
                                                     sigset_t __user* set,
                                                     sigset_t __user* oset,
                                                     size_t sigsetsize);
typedef asmlinkage long (*sys_rt_sigpending_func_t)(sigset_t __user* set,
                                                    size_t sigsetsize);
typedef asmlinkage long (*sys_rt_sigtimedwait_func_t)(
    const sigset_t __user* uthese, siginfo_t __user* uinfo,
    const struct __kernel_timespec __user* uts, size_t sigsetsize);
typedef asmlinkage long (*sys_rt_sigtimedwait_time32_func_t)(
    const sigset_t __user* uthese, siginfo_t __user* uinfo,
    const struct old_timespec32 __user* uts, size_t sigsetsize);
typedef asmlinkage long (*sys_rt_sigqueueinfo_func_t)(pid_t pid, int sig,
                                                      siginfo_t __user* uinfo);

/* kernel/sys.c */
typedef asmlinkage long (*sys_setpriority_func_t)(int which, int who,
                                                  int niceval);
typedef asmlinkage long (*sys_getpriority_func_t)(int which, int who);
typedef asmlinkage long (*sys_reboot_func_t)(int magic1, int magic2,
                                             unsigned int cmd,
                                             void __user* arg);
typedef asmlinkage long (*sys_setregid_func_t)(gid_t rgid, gid_t egid);
typedef asmlinkage long (*sys_setgid_func_t)(gid_t gid);
typedef asmlinkage long (*sys_setreuid_func_t)(uid_t ruid, uid_t euid);
typedef asmlinkage long (*sys_setuid_func_t)(uid_t uid);
typedef asmlinkage long (*sys_setresuid_func_t)(uid_t ruid, uid_t euid,
                                                uid_t suid);
typedef asmlinkage long (*sys_getresuid_func_t)(uid_t __user* ruid,
                                                uid_t __user* euid,
                                                uid_t __user* suid);
typedef asmlinkage long (*sys_setresgid_func_t)(gid_t rgid, gid_t egid,
                                                gid_t sgid);
typedef asmlinkage long (*sys_getresgid_func_t)(gid_t __user* rgid,
                                                gid_t __user* egid,
                                                gid_t __user* sgid);
typedef asmlinkage long (*sys_setfsuid_func_t)(uid_t uid);
typedef asmlinkage long (*sys_setfsgid_func_t)(gid_t gid);
typedef asmlinkage long (*sys_times_func_t)(struct tms __user* tbuf);
typedef asmlinkage long (*sys_setpgid_func_t)(pid_t pid, pid_t pgid);
typedef asmlinkage long (*sys_getpgid_func_t)(pid_t pid);
typedef asmlinkage long (*sys_getsid_func_t)(pid_t pid);
typedef asmlinkage long (*sys_setsid_func_t)(void);
typedef asmlinkage long (*sys_getgroups_func_t)(int   gidsetsize,
                                                gid_t __user* grouplist);
typedef asmlinkage long (*sys_setgroups_func_t)(int   gidsetsize,
                                                gid_t __user* grouplist);
typedef asmlinkage long (*sys_newuname_func_t)(struct new_utsname __user* name);
typedef asmlinkage long (*sys_sethostname_func_t)(char __user* name, int len);
typedef asmlinkage long (*sys_setdomainname_func_t)(char __user* name, int len);
typedef asmlinkage long (*sys_getrlimit_func_t)(unsigned int  resource,
                                                struct rlimit __user* rlim);
typedef asmlinkage long (*sys_setrlimit_func_t)(unsigned int  resource,
                                                struct rlimit __user* rlim);
typedef asmlinkage long (*sys_getrusage_func_t)(int           who,
                                                struct rusage __user* ru);
typedef asmlinkage long (*sys_umask_func_t)(int mask);
typedef asmlinkage long (*sys_prctl_func_t)(int option, unsigned long arg2,
                                            unsigned long arg3,
                                            unsigned long arg4,
                                            unsigned long arg5);
typedef asmlinkage long (*sys_getcpu_func_t)(unsigned __user* cpu,
                                             unsigned __user*    node,
                                             struct getcpu_cache __user* cache);

/* kernel/time.c */
typedef asmlinkage long (*sys_gettimeofday_func_t)(
    struct __kernel_old_timeval __user* tv, struct timezone __user* tz);
typedef asmlinkage long (*sys_settimeofday_func_t)(
    struct __kernel_old_timeval __user* tv, struct timezone __user* tz);

/* kernel/timer.c */
typedef asmlinkage long (*sys_getpid_func_t)(void);
typedef asmlinkage long (*sys_getppid_func_t)(void);
typedef asmlinkage long (*sys_getuid_func_t)(void);
typedef asmlinkage long (*sys_geteuid_func_t)(void);
typedef asmlinkage long (*sys_getgid_func_t)(void);
typedef asmlinkage long (*sys_getegid_func_t)(void);
typedef asmlinkage long (*sys_gettid_func_t)(void);
typedef asmlinkage long (*sys_sysinfo_func_t)(struct sysinfo __user* info);

/* ipc/mqueue.c */
typedef asmlinkage long (*sys_mq_open_func_t)(const char __user* name,
                                              int oflag, umode_t mode,
                                              struct mq_attr __user* attr);
typedef asmlinkage long (*sys_mq_unlink_func_t)(const char __user* name);
typedef asmlinkage long (*sys_mq_timedsend_func_t)(
    mqd_t mqdes, const char __user* msg_ptr, size_t msg_len,
    unsigned int msg_prio, const struct __kernel_timespec __user* abs_timeout);
typedef asmlinkage long (*sys_mq_timedreceive_func_t)(
    mqd_t mqdes, char __user* msg_ptr, size_t msg_len,
    unsigned int __user*           msg_prio,
    const struct __kernel_timespec __user* abs_timeout);
typedef asmlinkage long (*sys_mq_notify_func_t)(
    mqd_t mqdes, const struct sigevent __user* notification);
typedef asmlinkage long (*sys_mq_getsetattr_func_t)(
    mqd_t mqdes, const struct mq_attr __user* mqstat,
    struct mq_attr __user* omqstat);
typedef asmlinkage long (*sys_mq_timedreceive_time32_func_t)(
    mqd_t mqdes, char __user* u_msg_ptr, unsigned int msg_len,
    unsigned int __user*        u_msg_prio,
    const struct old_timespec32 __user* u_abs_timeout);
typedef asmlinkage long (*sys_mq_timedsend_time32_func_t)(
    mqd_t mqdes, const char __user* u_msg_ptr, unsigned int msg_len,
    unsigned int msg_prio, const struct old_timespec32 __user* u_abs_timeout);

/* ipc/msg.c */
typedef asmlinkage long (*sys_msgget_func_t)(key_t key, int msgflg);
typedef asmlinkage long (*sys_old_msgctl_func_t)(int msqid, int cmd,
                                                 struct msqid_ds __user* buf);
typedef asmlinkage long (*sys_msgctl_func_t)(int msqid, int cmd,
                                             struct msqid_ds __user* buf);
typedef asmlinkage long (*sys_msgrcv_func_t)(int           msqid,
                                             struct msgbuf __user* msgp,
                                             size_t msgsz, long msgtyp,
                                             int msgflg);
typedef asmlinkage long (*sys_msgsnd_func_t)(int           msqid,
                                             struct msgbuf __user* msgp,
                                             size_t msgsz, int msgflg);

/* ipc/sem.c */
typedef asmlinkage long (*sys_semget_func_t)(key_t key, int nsems, int semflg);
typedef asmlinkage long (*sys_semctl_func_t)(int semid, int semnum, int cmd,
                                             unsigned long arg);
typedef asmlinkage long (*sys_old_semctl_func_t)(int semid, int semnum, int cmd,
                                                 unsigned long arg);
typedef asmlinkage long (*sys_semtimedop_func_t)(
    int semid, struct sembuf __user* sops, unsigned nsops,
    const struct __kernel_timespec __user* timeout);
typedef asmlinkage long (*sys_semtimedop_time32_func_t)(
    int semid, struct sembuf __user* sops, unsigned nsops,
    const struct old_timespec32 __user* timeout);
typedef asmlinkage long (*sys_semop_func_t)(int           semid,
                                            struct sembuf __user* sops,
                                            unsigned              nsops);

/* ipc/shm.c */
typedef asmlinkage long (*sys_shmget_func_t)(key_t key, size_t size, int flag);
typedef asmlinkage long (*sys_old_shmctl_func_t)(int shmid, int cmd,
                                                 struct shmid_ds __user* buf);
typedef asmlinkage long (*sys_shmctl_func_t)(int shmid, int cmd,
                                             struct shmid_ds __user* buf);
typedef asmlinkage long (*sys_shmat_func_t)(int shmid, char __user* shmaddr,
                                            int shmflg);
typedef asmlinkage long (*sys_shmdt_func_t)(char __user* shmaddr);

/* net/socket.c */
typedef asmlinkage long (*sys_socket_func_t)(int, int, int);
typedef asmlinkage long (*sys_socketpair_func_t)(int, int, int, int __user*);
typedef asmlinkage long (*sys_bind_func_t)(int, struct sockaddr __user*, int);
typedef asmlinkage long (*sys_listen_func_t)(int, int);
typedef asmlinkage long (*sys_accept_func_t)(int, struct sockaddr __user*,
                                             int __user*);
typedef asmlinkage long (*sys_connect_func_t)(int, struct sockaddr __user*,
                                              int);
typedef asmlinkage long (*sys_getsockname_func_t)(int, struct sockaddr __user*,
                                                  int __user*);
typedef asmlinkage long (*sys_getpeername_func_t)(int, struct sockaddr __user*,
                                                  int __user*);
typedef asmlinkage long (*sys_sendto_func_t)(int, void __user*, size_t,
                                             unsigned, struct sockaddr __user*,
                                             int);
typedef asmlinkage long (*sys_recvfrom_func_t)(int, void __user*, size_t,
                                               unsigned,
                                               struct sockaddr __user*,
                                               int             __user*);
typedef asmlinkage long (*sys_setsockopt_func_t)(int fd, int level, int optname,
                                                 char __user* optval,
                                                 int          optlen);
typedef asmlinkage long (*sys_getsockopt_func_t)(int fd, int level, int optname,
                                                 char __user* optval,
                                                 int __user* optlen);
typedef asmlinkage long (*sys_shutdown_func_t)(int, int);
typedef asmlinkage long (*sys_sendmsg_func_t)(int                fd,
                                              struct user_msghdr __user* msg,
                                              unsigned                   flags);
typedef asmlinkage long (*sys_recvmsg_func_t)(int                fd,
                                              struct user_msghdr __user* msg,
                                              unsigned                   flags);

/* mm/filemap.c */
typedef asmlinkage long (*sys_readahead_func_t)(int fd, loff_t offset,
                                                size_t count);

/* mm/nommu.c, also with MMU */
typedef asmlinkage long (*sys_brk_func_t)(unsigned long brk);
typedef asmlinkage long (*sys_munmap_func_t)(unsigned long addr, size_t len);
typedef asmlinkage long (*sys_mremap_func_t)(unsigned long addr,
                                             unsigned long old_len,
                                             unsigned long new_len,
                                             unsigned long flags,
                                             unsigned long new_addr);

/* security/keys/keyctl.c */
typedef asmlinkage long (*sys_add_key_func_t)(const char __user* _type,
                                              const char __user* _description,
                                              const void __user* _payload,
                                              size_t             plen,
                                              key_serial_t       destringid);
typedef asmlinkage long (*sys_request_key_func_t)(
    const char __user* _type, const char __user* _description,
    const char __user* _callout_info, key_serial_t destringid);
typedef asmlinkage long (*sys_keyctl_func_t)(int cmd, unsigned long arg2,
                                             unsigned long arg3,
                                             unsigned long arg4,
                                             unsigned long arg5);

/* arch/example/kernel/sys_example.c */
#ifdef CONFIG_CLONE_BACKWARDS
typedef asmlinkage long (*sys_clone_func_t)(unsigned long, unsigned long,
                                            int __user*, unsigned long,
                                            int __user*);
#else
#ifdef CONFIG_CLONE_BACKWARDS3
typedef asmlinkage long (*sys_clone_func_t)(unsigned long, unsigned long, int,
                                            int __user*, int __user*,
                                            unsigned long);
#else
typedef asmlinkage long (*sys_clone_func_t)(unsigned long, unsigned long,
                                            int __user*, int __user*,
                                            unsigned long);
#endif
#endif

typedef asmlinkage long (*sys_execve_func_t)(
    const char __user* filename, const char __user* const __user* argv,
    const char __user* const __user* envp);

/* mm/fadvise.c */
typedef asmlinkage long (*sys_fadvise64_64_func_t)(int fd, loff_t offset,
                                                   loff_t len, int advice);

/* mm/, CONFIG_MMU only */
typedef asmlinkage long (*sys_swapon_func_t)(const char __user* specialfile,
                                             int                swap_flags);
typedef asmlinkage long (*sys_swapoff_func_t)(const char __user* specialfile);
typedef asmlinkage long (*sys_mprotect_func_t)(unsigned long start, size_t len,
                                               unsigned long prot);
typedef asmlinkage long (*sys_msync_func_t)(unsigned long start, size_t len,
                                            int flags);
typedef asmlinkage long (*sys_mlock_func_t)(unsigned long start, size_t len);
typedef asmlinkage long (*sys_munlock_func_t)(unsigned long start, size_t len);
typedef asmlinkage long (*sys_mlockall_func_t)(int flags);
typedef asmlinkage long (*sys_munlockall_func_t)(void);
typedef asmlinkage long (*sys_mincore_func_t)(unsigned long start, size_t len,
                                              unsigned char __user* vec);
typedef asmlinkage long (*sys_madvise_func_t)(unsigned long start, size_t len,
                                              int behavior);
typedef asmlinkage long (*sys_remap_file_pages_func_t)(unsigned long start,
                                                       unsigned long size,
                                                       unsigned long prot,
                                                       unsigned long pgoff,
                                                       unsigned long flags);
typedef asmlinkage long (*sys_mbind_func_t)(
    unsigned long start, unsigned long len, unsigned long mode,
    const unsigned long __user* nmask, unsigned long maxnode, unsigned flags);
typedef asmlinkage long (*sys_get_mempolicy_func_t)(int __user*   policy,
                                                    unsigned long __user* nmask,
                                                    unsigned long maxnode,
                                                    unsigned long addr,
                                                    unsigned long flags);
typedef asmlinkage long (*sys_set_mempolicy_func_t)(
    int mode, const unsigned long __user* nmask, unsigned long maxnode);
typedef asmlinkage long (*sys_migrate_pages_func_t)(
    pid_t pid, unsigned long maxnode, const unsigned long __user* from,
    const unsigned long __user* to);
typedef asmlinkage long (*sys_move_pages_func_t)(
    pid_t pid, unsigned long nr_pages, const void __user* __user* pages,
    const int __user* nodes, int __user* status, int flags);

typedef asmlinkage long (*sys_rt_tgsigqueueinfo_func_t)(
    pid_t tgid, pid_t pid, int sig, siginfo_t __user* uinfo);
typedef asmlinkage long (*sys_perf_event_open_func_t)(
    struct perf_event_attr __user* attr_uptr, pid_t pid, int cpu, int group_fd,
    unsigned long flags);
typedef asmlinkage long (*sys_accept4_func_t)(int, struct sockaddr __user*,
                                              int __user*, int);
typedef asmlinkage long (*sys_recvmmsg_func_t)(
    int fd, struct mmsghdr __user* msg, unsigned int vlen, unsigned flags,
    struct __kernel_timespec __user* timeout);
typedef asmlinkage long (*sys_recvmmsg_time32_func_t)(
    int fd, struct mmsghdr __user* msg, unsigned int vlen, unsigned flags,
    struct old_timespec32 __user* timeout);

typedef asmlinkage long (*sys_wait4_func_t)(pid_t pid, int __user* stat_addr,
                                            int           options,
                                            struct rusage __user* ru);
typedef asmlinkage long (*sys_prlimit64_func_t)(
    pid_t pid, unsigned int resource, const struct rlimit64 __user* new_rlim,
    struct rlimit64 __user* old_rlim);
typedef asmlinkage long (*sys_fanotify_init_func_t)(unsigned int flags,
                                                    unsigned int event_f_flags);
typedef asmlinkage long (*sys_fanotify_mark_func_t)(
    int fanotify_fd, unsigned int flags, u64 mask, int fd,
    const char __user* pathname);
typedef asmlinkage long (*sys_name_to_handle_at_func_t)(
    int dfd, const char __user* name, struct file_handle __user* handle,
    int __user* mnt_id, int flag);
typedef asmlinkage long (*sys_open_by_handle_at_func_t)(
    int mountdirfd, struct file_handle __user* handle, int flags);
typedef asmlinkage long (*sys_syncfs_func_t)(int fd);
typedef asmlinkage long (*sys_setns_func_t)(int fd, int nstype);
typedef asmlinkage long (*sys_pidfd_open_func_t)(pid_t pid, unsigned int flags);
typedef asmlinkage long (*sys_sendmmsg_func_t)(int            fd,
                                               struct mmsghdr __user* msg,
                                               unsigned int           vlen,
                                               unsigned               flags);
typedef asmlinkage long (*sys_process_vm_readv_func_t)(
    pid_t pid, const struct iovec __user* lvec, unsigned long liovcnt,
    const struct iovec __user* rvec, unsigned long riovcnt,
    unsigned long flags);
typedef asmlinkage long (*sys_process_vm_writev_func_t)(
    pid_t pid, const struct iovec __user* lvec, unsigned long liovcnt,
    const struct iovec __user* rvec, unsigned long riovcnt,
    unsigned long flags);
typedef asmlinkage long (*sys_kcmp_func_t)(pid_t pid1, pid_t pid2, int type,
                                           unsigned long idx1,
                                           unsigned long idx2);
typedef asmlinkage long (*sys_finit_module_func_t)(int        fd,
                                                   const char __user* uargs,
                                                   int                flags);
typedef asmlinkage long (*sys_sched_setattr_func_t)(
    pid_t pid, struct sched_attr __user* attr, unsigned int flags);
typedef asmlinkage long (*sys_sched_getattr_func_t)(
    pid_t pid, struct sched_attr __user* attr, unsigned int size,
    unsigned int flags);
typedef asmlinkage long (*sys_renameat2_func_t)(int        olddfd,
                                                const char __user* oldname,
                                                int                newdfd,
                                                const char __user* newname,
                                                unsigned int       flags);
typedef asmlinkage long (*sys_seccomp_func_t)(unsigned int op,
                                              unsigned int flags,
                                              void __user* uargs);
typedef asmlinkage long (*sys_getrandom_func_t)(char __user* buf, size_t count,
                                                unsigned int flags);
typedef asmlinkage long (*sys_memfd_create_func_t)(const char __user* uname_ptr,
                                                   unsigned int       flags);
typedef asmlinkage long (*sys_bpf_func_t)(int cmd, union bpf_attr* attr,
                                          unsigned int size);
typedef asmlinkage long (*sys_execveat_func_t)(
    int dfd, const char __user* filename, const char __user* const __user* argv,
    const char __user* const __user* envp, int flags);
typedef asmlinkage long (*sys_userfaultfd_func_t)(int flags);
typedef asmlinkage long (*sys_membarrier_func_t)(int cmd, int flags);
typedef asmlinkage long (*sys_mlock2_func_t)(unsigned long start, size_t len,
                                             int flags);
typedef asmlinkage long (*sys_copy_file_range_func_t)(
    int fd_in, loff_t __user* off_in, int fd_out, loff_t __user* off_out,
    size_t len, unsigned int flags);
typedef asmlinkage long (*sys_preadv2_func_t)(unsigned long      fd,
                                              const struct iovec __user* vec,
                                              unsigned long              vlen,
                                              unsigned long              pos_l,
                                              unsigned long pos_h, rwf_t flags);
typedef asmlinkage long (*sys_pwritev2_func_t)(
    unsigned long fd, const struct iovec __user* vec, unsigned long vlen,
    unsigned long pos_l, unsigned long pos_h, rwf_t flags);
typedef asmlinkage long (*sys_pkey_mprotect_func_t)(unsigned long start,
                                                    size_t        len,
                                                    unsigned long prot,
                                                    int           pkey);
typedef asmlinkage long (*sys_pkey_alloc_func_t)(unsigned long flags,
                                                 unsigned long init_val);
typedef asmlinkage long (*sys_pkey_free_func_t)(int pkey);
typedef asmlinkage long (*sys_statx_func_t)(int dfd, const char __user* path,
                                            unsigned flags, unsigned mask,
                                            struct statx __user* buffer);
typedef asmlinkage long (*sys_rseq_func_t)(struct rseq __user* rseq,
                                           uint32_t rseq_len, int flags,
                                           uint32_t sig);
typedef asmlinkage long (*sys_open_tree_func_t)(int        dfd,
                                                const char __user* path,
                                                unsigned           flags);
typedef asmlinkage long (*sys_move_mount_func_t)(int        from_dfd,
                                                 const char __user* from_path,
                                                 int                to_dfd,
                                                 const char __user* to_path,
                                                 unsigned int       ms_flags);
typedef asmlinkage long (*sys_fsopen_func_t)(const char __user* fs_name,
                                             unsigned int       flags);
typedef asmlinkage long (*sys_fsconfig_func_t)(int fs_fd, unsigned int cmd,
                                               const char __user* key,
                                               const void __user* value,
                                               int                aux);
typedef asmlinkage long (*sys_fsmount_func_t)(int fs_fd, unsigned int flags,
                                              unsigned int ms_flags);
typedef asmlinkage long (*sys_fspick_func_t)(int dfd, const char __user* path,
                                             unsigned int flags);
typedef asmlinkage long (*sys_pidfd_send_signal_func_t)(int pidfd, int sig,
                                                        siginfo_t __user* info,
                                                        unsigned int flags);
typedef asmlinkage long (*sys_pidfd_getfd_func_t)(int pidfd, int fd,
                                                  unsigned int flags);

/*
 * Architecture-specific system calls
 */

/* arch/x86/kernel/ioport.c */
typedef asmlinkage long (*sys_ioperm_func_t)(unsigned long from,
                                             unsigned long num, int on);

/* pciconfig: alpha, arm, arm64, ia64, sparc */
typedef asmlinkage long (*sys_pciconfig_read_func_t)(unsigned long bus,
                                                     unsigned long dfn,
                                                     unsigned long off,
                                                     unsigned long len,
                                                     void __user* buf);
typedef asmlinkage long (*sys_pciconfig_write_func_t)(unsigned long bus,
                                                      unsigned long dfn,
                                                      unsigned long off,
                                                      unsigned long len,
                                                      void __user* buf);
typedef asmlinkage long (*sys_pciconfig_iobase_func_t)(long          which,
                                                       unsigned long bus,
                                                       unsigned long devfn);

/* powerpc */
typedef asmlinkage long (*sys_spu_run_func_t)(int fd, __u32 __user* unpc,
                                              __u32 __user* ustatus);
typedef asmlinkage long (*sys_spu_create_func_t)(const char __user* name,
                                                 unsigned int       flags,
                                                 umode_t mode, int fd);

/*
 * Deprecated system calls which are still defined in
 * include/uapi/asm-generic/unistd.h and wanted by >= 1 arch
 */

/* __ARCH_WANT_SYSCALL_NO_AT */
typedef asmlinkage long (*sys_open_func_t)(const char __user* filename,
                                           int flags, umode_t mode);
typedef asmlinkage long (*sys_link_func_t)(const char __user* oldname,
                                           const char __user* newname);
typedef asmlinkage long (*sys_unlink_func_t)(const char __user* pathname);
typedef asmlinkage long (*sys_mknod_func_t)(const char __user* filename,
                                            umode_t mode, unsigned dev);
typedef asmlinkage long (*sys_chmod_func_t)(const char __user* filename,
                                            umode_t            mode);
typedef asmlinkage long (*sys_chown_func_t)(const char __user* filename,
                                            uid_t user, gid_t group);
typedef asmlinkage long (*sys_mkdir_func_t)(const char __user* pathname,
                                            umode_t            mode);
typedef asmlinkage long (*sys_rmdir_func_t)(const char __user* pathname);
typedef asmlinkage long (*sys_lchown_func_t)(const char __user* filename,
                                             uid_t user, gid_t group);
typedef asmlinkage long (*sys_access_func_t)(const char __user* filename,
                                             int                mode);
typedef asmlinkage long (*sys_rename_func_t)(const char __user* oldname,
                                             const char __user* newname);
typedef asmlinkage long (*sys_symlink_func_t)(const char __user* old,
                                              const char         __user* new);
#if defined(__ARCH_WANT_STAT64) || defined(__ARCH_WANT_COMPAT_STAT64)
typedef asmlinkage long (*sys_stat64_func_t)(const char __user* filename,
                                             struct stat64 __user* statbuf);
typedef asmlinkage long (*sys_lstat64_func_t)(const char __user* filename,
                                              struct stat64 __user* statbuf);
#endif

/* __ARCH_WANT_SYSCALL_NO_FLAGS */
typedef asmlinkage long (*sys_pipe_func_t)(int __user* fildes);
typedef asmlinkage long (*sys_dup2_func_t)(unsigned int oldfd,
                                           unsigned int newfd);
typedef asmlinkage long (*sys_epoll_create_func_t)(int size);
typedef asmlinkage long (*sys_inotify_init_func_t)(void);
typedef asmlinkage long (*sys_eventfd_func_t)(unsigned int count);
typedef asmlinkage long (*sys_signalfd_func_t)(int      ufd,
                                               sigset_t __user* user_mask,
                                               size_t           sizemask);

/* __ARCH_WANT_SYSCALL_OFF_T */
typedef asmlinkage long (*sys_sendfile_func_t)(int out_fd, int in_fd,
                                               off_t __user* offset,
                                               size_t        count);
typedef asmlinkage long (*sys_newstat_func_t)(const char __user* filename,
                                              struct stat __user* statbuf);
typedef asmlinkage long (*sys_newlstat_func_t)(const char __user* filename,
                                               struct stat __user* statbuf);
typedef asmlinkage long (*sys_fadvise64_func_t)(int fd, loff_t offset,
                                                size_t len, int advice);

/* __ARCH_WANT_SYSCALL_DEPRECATED */
typedef asmlinkage long (*sys_alarm_func_t)(unsigned int seconds);
typedef asmlinkage long (*sys_getpgrp_func_t)(void);
typedef asmlinkage long (*sys_pause_func_t)(void);
#ifdef __ARCH_WANT_SYS_UTIME
typedef asmlinkage long (*sys_utime_func_t)(char __user*   filename,
                                            struct utimbuf __user* times);
typedef asmlinkage long (*sys_utimes_func_t)(
    char __user* filename, struct __kernel_old_timeval __user* utimes);
typedef asmlinkage long (*sys_futimesat_func_t)(
    int dfd, const char __user* filename,
    struct __kernel_old_timeval __user* utimes);
#endif
typedef asmlinkage long (*sys_futimesat_time32_func_t)(
    unsigned int dfd, const char __user* filename,
    struct old_timeval32 __user* t);
typedef asmlinkage long (*sys_utimes_time32_func_t)(
    const char __user* filename, struct old_timeval32 __user* t);
typedef asmlinkage long (*sys_creat_func_t)(const char __user* pathname,
                                            umode_t            mode);
typedef asmlinkage long (*sys_getdents_func_t)(
    unsigned int fd, struct linux_dirent __user* dirent, unsigned int count);
typedef asmlinkage long (*sys_select_func_t)(
    int n, fd_set __user* inp, fd_set __user* outp, fd_set __user* exp,
    struct __kernel_old_timeval __user* tvp);
typedef asmlinkage long (*sys_poll_func_t)(struct pollfd __user* ufds,
                                           unsigned int nfds, int timeout);
typedef asmlinkage long (*sys_epoll_wait_func_t)(
    int epfd, struct epoll_event __user* events, int maxevents, int timeout);
typedef asmlinkage long (*sys_ustat_func_t)(unsigned     dev,
                                            struct ustat __user* ubuf);
typedef asmlinkage long (*sys_vfork_func_t)(void);
typedef asmlinkage long (*sys_recv_func_t)(int, void __user*, size_t, unsigned);
typedef asmlinkage long (*sys_send_func_t)(int, void __user*, size_t, unsigned);
typedef asmlinkage long (*sys_bdflush_func_t)(int func, long data);
typedef asmlinkage long (*sys_oldumount_func_t)(char __user* name);
typedef asmlinkage long (*sys_uselib_func_t)(const char __user* library);
typedef asmlinkage long (*sys_sysctl_func_t)(struct __sysctl_args __user* args);
typedef asmlinkage long (*sys_sysfs_func_t)(int option, unsigned long arg1,
                                            unsigned long arg2);
typedef asmlinkage long (*sys_fork_func_t)(void);

/* obsolete: kernel/signal.c */
typedef asmlinkage long (*sys_sigpending_func_t)(old_sigset_t __user* uset);
typedef asmlinkage long (*sys_sigprocmask_func_t)(int          how,
                                                  old_sigset_t __user* set,
                                                  old_sigset_t __user* oset);
#ifdef CONFIG_OLD_SIGSUSPEND
typedef asmlinkage long (*sys_sigsuspend_func_t)(old_sigset_t mask);
#endif

#ifdef CONFIG_OLD_SIGSUSPEND3
typedef asmlinkage long (*sys_sigsuspend_func_t)(int unused1, int unused2,
                                                 old_sigset_t mask);
#endif

#ifdef CONFIG_OLD_SIGACTION
typedef asmlinkage long (*sys_sigaction_func_t)(
    int, const struct old_sigaction __user*, struct old_sigaction __user*);
#endif
typedef asmlinkage long (*sys_sgetmask_func_t)(void);
typedef asmlinkage long (*sys_ssetmask_func_t)(int newmask);
typedef asmlinkage long (*sys_signal_func_t)(int sig, __sighandler_t handler);

/* obsolete: kernel/sched/core.c */
typedef asmlinkage long (*sys_nice_func_t)(int increment);

/* obsolete: kernel/kexec_file.c */
typedef asmlinkage long (*sys_kexec_file_load_func_t)(
    int kernel_fd, int initrd_fd, unsigned long cmdline_len,
    const char __user* cmdline_ptr, unsigned long flags);

/* obsolete: kernel/exit.c */
typedef asmlinkage long (*sys_waitpid_func_t)(pid_t pid, int __user* stat_addr,
                                              int options);

/* obsolete: kernel/uid16.c */
#ifdef CONFIG_HAVE_UID16
typedef asmlinkage long (*sys_chown16_func_t)(const char __user* filename,
                                              old_uid_t user, old_gid_t group);
typedef asmlinkage long (*sys_lchown16_func_t)(const char __user* filename,
                                               old_uid_t user, old_gid_t group);
typedef asmlinkage long (*sys_fchown16_func_t)(unsigned int fd, old_uid_t user,
                                               old_gid_t group);
typedef asmlinkage long (*sys_setregid16_func_t)(old_gid_t rgid,
                                                 old_gid_t egid);
typedef asmlinkage long (*sys_setgid16_func_t)(old_gid_t gid);
typedef asmlinkage long (*sys_setreuid16_func_t)(old_uid_t ruid,
                                                 old_uid_t euid);
typedef asmlinkage long (*sys_setuid16_func_t)(old_uid_t uid);
typedef asmlinkage long (*sys_setresuid16_func_t)(old_uid_t ruid,
                                                  old_uid_t euid,
                                                  old_uid_t suid);
typedef asmlinkage long (*sys_getresuid16_func_t)(old_uid_t __user* ruid,
                                                  old_uid_t __user* euid,
                                                  old_uid_t __user* suid);
typedef asmlinkage long (*sys_setresgid16_func_t)(old_gid_t rgid,
                                                  old_gid_t egid,
                                                  old_gid_t sgid);
typedef asmlinkage long (*sys_getresgid16_func_t)(old_gid_t __user* rgid,
                                                  old_gid_t __user* egid,
                                                  old_gid_t __user* sgid);
typedef asmlinkage long (*sys_setfsuid16_func_t)(old_uid_t uid);
typedef asmlinkage long (*sys_setfsgid16_func_t)(old_gid_t gid);
typedef asmlinkage long (*sys_getgroups16_func_t)(int       gidsetsize,
                                                  old_gid_t __user* grouplist);
typedef asmlinkage long (*sys_setgroups16_func_t)(int       gidsetsize,
                                                  old_gid_t __user* grouplist);
typedef asmlinkage long (*sys_getuid16_func_t)(void);
typedef asmlinkage long (*sys_geteuid16_func_t)(void);
typedef asmlinkage long (*sys_getgid16_func_t)(void);
typedef asmlinkage long (*sys_getegid16_func_t)(void);
#endif

/* obsolete: net/socket.c */
typedef asmlinkage long (*sys_socketcall_func_t)(int           call,
                                                 unsigned long __user* args);

/* obsolete: fs/stat.c */
typedef asmlinkage long (*sys_stat_func_t)(
    const char __user* filename, struct __old_kernel_stat __user* statbuf);
typedef asmlinkage long (*sys_lstat_func_t)(
    const char __user* filename, struct __old_kernel_stat __user* statbuf);
typedef asmlinkage long (*sys_fstat_func_t)(
    unsigned int fd, struct __old_kernel_stat __user* statbuf);
typedef asmlinkage long (*sys_readlink_func_t)(const char __user* path,
                                               char __user* buf, int bufsiz);

/* obsolete: fs/select.c */
typedef asmlinkage long (*sys_old_select_func_t)(
    struct sel_arg_struct __user* arg);

/* obsolete: fs/readdir.c */
typedef asmlinkage long (*sys_old_readdir_func_t)(
    unsigned int, struct old_linux_dirent __user*, unsigned int);

/* obsolete: kernel/sys.c */
typedef asmlinkage long (*sys_gethostname_func_t)(char __user* name, int len);
typedef asmlinkage long (*sys_uname_func_t)(struct old_utsname __user*);
typedef asmlinkage long (*sys_olduname_func_t)(struct oldold_utsname __user*);
#ifdef __ARCH_WANT_SYS_OLD_GETRLIMIT
typedef asmlinkage long (*sys_old_getrlimit_func_t)(unsigned int  resource,
                                                    struct rlimit __user* rlim);
#endif

/* obsolete: ipc */
typedef asmlinkage long (*sys_ipc_func_t)(unsigned int call, int first,
                                          unsigned long second,
                                          unsigned long third, void __user* ptr,
                                          long fifth);

/* obsolete: mm/ */
typedef asmlinkage long (*sys_mmap_pgoff_func_t)(
    unsigned long addr, unsigned long len, unsigned long prot,
    unsigned long flags, unsigned long fd, unsigned long pgoff);
typedef asmlinkage long (*sys_old_mmap_func_t)(
    struct mmap_arg_struct __user* arg);

/*
 * Not a real system call, but a placeholder for syscalls which are
 * not implemented -- see kernel/sys_ni.c
 */
typedef asmlinkage long (*sys_ni_syscall_func_t)(void);

#endif /* _HOOK_SYSCALL_INTERNAL_PROTO_H */
